package com.sojson.project.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sojson.project.dao.EducationExperienceDao;
import com.sojson.project.entity.po.EducationExperience;
import com.sojson.project.service.EducationExperienceService;

/**
 * 教育经历表Service实现类
 * 
 * @author liu
 * @date 2021-04-26
 */
@Service
public class EducationExperienceServiceImpl implements EducationExperienceService {

    @Resource
    private EducationExperienceDao educationExperienceDaoImpl;

    /**
     * 单条插入
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int insert(EducationExperience educationExperience) {
        int insert = educationExperienceDaoImpl.insert(educationExperience);
        return insert;
    }

    /**
     * 批量插入
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int insertList(EducationExperience educationExperience) {
        int insertList = educationExperienceDaoImpl.insertList(educationExperience.getEducationExperiences());
        return insertList;
    }

    /**
     * 通过对象批量删除(物理删除)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int deleteByDto(EducationExperience educationExperience) {
        int deleteByDto = educationExperienceDaoImpl.deleteByDto(educationExperience);
        return deleteByDto;
    }

    /**
     * 统计全部数量
     * 
     * @return
     */
    @Override
    public int countAll() {
        int countAll = educationExperienceDaoImpl.countAll();
        return countAll;
    }

    /**
     * 查询所有
     * 
     * @return
     */
    @Override
    public List<EducationExperience> findAll() {
        List<EducationExperience> findAll = educationExperienceDaoImpl.listAll();
        return findAll;
    }

    /**
     * 根据对象统计数量
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int countByDto(EducationExperience educationExperience) {
        int countByDto = educationExperienceDaoImpl.countByDto(educationExperience);
        return countByDto;
    }

    /**
     * 根据对象查询
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public List<EducationExperience> findByDto(EducationExperience educationExperience) {
        List<EducationExperience> findByDto = educationExperienceDaoImpl.listByDto(educationExperience);
        return findByDto;
    }

    /**
     * 通过id删除(物理删除)
     * 
     * @param id
     * @return
     */
    @Override
    public int deleteById(Integer id) {
        int deleteById = educationExperienceDaoImpl.deleteById(id);
        return deleteById;
    }

    /**
     * 通过id列表删除(物理删除)
     * 
     * @param ids
     * @return
     */
    @Override
    public int deleteByIdList(List<Integer> ids) {
        int deleteByIdList = educationExperienceDaoImpl.deleteByIdList(ids);
        return deleteByIdList;
    }

    /**
     * 通过id更新(全部更新)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updateById(EducationExperience educationExperience) {
        int updateById = educationExperienceDaoImpl.updateById(educationExperience);
        return updateById;
    }

    /**
     * 通过id列表更新(全部更新)(更新内容相同)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updateStaticByIdList(EducationExperience educationExperience) {
        int updateStaticByIdList = educationExperienceDaoImpl.updateStaticByIdList(educationExperience);
        return updateStaticByIdList;
    }

    /**
     * 通过id列表更新(全部更新)(更新内容不相同)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updateChangeByIdList(EducationExperience educationExperience) {
        int updateChangeByIdList = educationExperienceDaoImpl.updateChangeByIdList(educationExperience.getEducationExperiences());
        return updateChangeByIdList;
    }

    /**
     * 通过id更新(局部更新)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updatePartialById(EducationExperience educationExperience) {
        int updatePartialById = educationExperienceDaoImpl.updatePartialById(educationExperience);
        return updatePartialById;
    }

    /**
     * 通过id列表更新(局部更新)(更新内容相同)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updateStaticPartialByIdList(EducationExperience educationExperience) {
        int updateStaticPartialByIdList = educationExperienceDaoImpl.updateStaticPartialByIdList(educationExperience);
        return updateStaticPartialByIdList;
    }

    /**
     * 通过id列表更新(局部更新)(更新内容不相同)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updateChangePartialByIdList(EducationExperience educationExperience) {
        int updateChangePartialByIdList = educationExperienceDaoImpl.updateChangePartialByIdList(educationExperience.getEducationExperiences());
        return updateChangePartialByIdList;
    }

    /**
     * 通过id查询
     * 
     * @param id
     * @return
     */
    @Override
    public EducationExperience findById(Integer id) {
        EducationExperience findById = educationExperienceDaoImpl.findById(id);
        return findById;
    }

    /**
     * 通过id列表查询
     * 
     * @param ids
     * @return
     */
    @Override
    public List<EducationExperience> findByIdList(List<Integer> ids) {
        List<EducationExperience> findByIdList = educationExperienceDaoImpl.findByIdList(ids);
        return findByIdList;
    }

    /**
     * 通过对象查询id列表
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public List<Integer> findIdByDto(EducationExperience educationExperience) {
        List<Integer> findIdByDto = educationExperienceDaoImpl.findIdByDto(educationExperience);
        return findIdByDto;
    }

    /**
     * 通过userId删除(物理删除)
     * 
     * @param userId
     * @return
     */
    @Override
    public int deleteByUserId(Integer userId) {
        int deleteByUserId = educationExperienceDaoImpl.deleteByUserId(userId);
        return deleteByUserId;
    }

    /**
     * 通过userId列表删除(物理删除)
     * 
     * @param userIds
     * @return
     */
    @Override
    public int deleteByUserIdList(List<Integer> userIds) {
        int deleteByUserIdList = educationExperienceDaoImpl.deleteByUserIdList(userIds);
        return deleteByUserIdList;
    }

    /**
     * 通过userId更新(全部更新)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updateByUserId(EducationExperience educationExperience) {
        int updateByUserId = educationExperienceDaoImpl.updateByUserId(educationExperience);
        return updateByUserId;
    }

    /**
     * 通过userId列表更新(全部更新)(更新内容相同)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updateStaticByUserIdList(EducationExperience educationExperience) {
        int updateStaticByUserIdList = educationExperienceDaoImpl.updateStaticByUserIdList(educationExperience);
        return updateStaticByUserIdList;
    }

    /**
     * 通过userId列表更新(全部更新)(更新内容不相同)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updateChangeByUserIdList(EducationExperience educationExperience) {
        int updateChangeByUserIdList = educationExperienceDaoImpl.updateChangeByUserIdList(educationExperience.getEducationExperiences());
        return updateChangeByUserIdList;
    }

    /**
     * 通过userId更新(局部更新)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updatePartialByUserId(EducationExperience educationExperience) {
        int updatePartialByUserId = educationExperienceDaoImpl.updatePartialByUserId(educationExperience);
        return updatePartialByUserId;
    }

    /**
     * 通过userId列表更新(局部更新)(更新内容相同)
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public int updateStaticPartialByUserIdList(EducationExperience educationExperience) {
        int updateStaticPartialByUserIdList = educationExperienceDaoImpl.updateStaticPartialByUserIdList(educationExperience);
        return updateStaticPartialByUserIdList;
    }

    /**
     * 通过userId列表更新(局部更新)(更新内容不相同)
     * 
     * @param educationExperiences
     * @return
     */
    @Override
    public int updateChangePartialByUserIdList(EducationExperience educationExperience) {
        int updateChangePartialByUserIdList = educationExperienceDaoImpl.updateChangePartialByUserIdList(educationExperience.getEducationExperiences());
        return updateChangePartialByUserIdList;
    }

    /**
     * 通过userId查询
     * 
     * @param userId
     * @return
     */
    @Override
    public EducationExperience findByUserId(Integer userId) {
        EducationExperience findByUserId = educationExperienceDaoImpl.findByUserId(userId);
        return findByUserId;
    }

    /**
     * 通过userId列表查询
     * 
     * @param userIds
     * @return
     */
    @Override
    public List<EducationExperience> findByUserIdList(List<Integer> userIds) {
        List<EducationExperience> findByUserIdList = educationExperienceDaoImpl.findByUserIdList(userIds);
        return findByUserIdList;
    }

    /**
     * 通过对象查询userId列表
     * 
     * @param educationExperience
     * @return
     */
    @Override
    public List<Integer> findUserIdByDto(EducationExperience educationExperience) {
        List<Integer> findUserIdByDto = educationExperienceDaoImpl.findUserIdByDto(educationExperience);
        return findUserIdByDto;
    }

    /**
     * 清空数据(物理清空)
     */
    @Override
    public void clear() {
        educationExperienceDaoImpl.clear();
    }

}